{include_core file="m/lib/header.html" title="订单详情"}
    <link rel="stylesheet" href="{$smarty.const.STATIC_URL}/css/baobao-main.css">
</head>

<body>
    <script type="text/javascript">
    ~ function() {
        // Gets a high and sets the visual window
        var width = document.getElementsByTagName('html')[0].getBoundingClientRect().width,
            fontSize = document.getElementsByTagName("html")[0];
        fontSize.style.fontSize = width * 0.05 + "px";
    }()
    </script>
    <div class="warp order">
        <!-- nav -->
        <div class="nav">
            <h2>{$order_info.store_info.store_name}</h2>
            <span class="pos">{$order_info.sign_user_info.realname}签约</span>
        </div>
        <!-- order_goods -->
        <div class="order_goods">
            {if $order_info.order_relation_list}
                {foreach $order_info.order_relation_list as $k=>$v}
                    <div class="goods_outer">
                        <div class="goods_inner">
                            <div class="goods_img">
                                <img src="{$v.goods_info.cover}" alt="img">
                            </div>
                            <div class="goods_list">
                                <h3>{$v.goods_info.title}</h3>
                                <div class="type_span">{$v.goods_info.intro}</div>
                                <div class="price"><span>价格</span><span class="price_num">{$v.goods_price}元</span><span class="num_li">数量 {$v.goods_num}箱</span></div>
                            </div>
                        </div>
                    </div>
                {/foreach}
            {/if}
            <!-- <div class="goods_outer">
                <div class="goods_inner">
                    <div class="goods_img">
                        <img src="{$smarty.const.STATIC_URL}/images/bao_img.gif" alt="img">
                    </div>
                    <div class="goods_list">
                        <h3>抱抱堂美式爆米花焦糖零食店散装</h3>
                        <div class="type_span"><span>焦糖口味</span><span>300盎司/箱</span><span>2箱起订</span></div>
                        <div class="price"><span>价格</span><span class="price_num">128元</span><span class="num_li">数量 11箱</span></div>
                    </div>
                </div>
            </div>
            <div class="goods_outer">
                <div class="goods_inner">
                    <div class="goods_img">
                        <img src="../images/bao_img.gif" alt="img">
                    </div>
                    <div class="goods_list">
                        <h3>抱抱堂美式爆米花焦糖零食店散装</h3>
                        <div class="type_span"><span>焦糖口味</span><span>300盎司/箱</span><span>2箱起订</span></div>
                        <div class="price"><span>价格</span><span class="price_num">128元</span><span class="num_li">数量 11箱</span></div>
                    </div>
                </div>
            </div> -->
        </div>
        <!-- distribution -->
        <div class="distribution">
            <ul>
                <li>杯桶配送：<span class="click_type">点击查看配送杯桶详单</span></li>
                <li>进货奖励：<span class="jifen">+{$order_info.score}积分</span></li>
                <!-- <li>进货奖励：<span>积分系统暂未开通</span></li> -->
                <li>抱抱币奖励：<span>抱抱币系统暂未开通</span></li>
            </ul>
        </div>
        <!-- mode -->
        <div class="mode">
            <ul>
                <li>支付方式：<span>上门收款</span></li>
                <li>配送方式：<span>上门送货</span></li>
                <li>本次收货手机号码：<span>{$order_info.mobile}</span></li>
                <li>合计：<span>（共{$order_info.goods_num}箱）<em>{$order_info.price}元</em></span></li>
            </ul>
        </div>
        <!-- footer -->
        <div class="footer">
            {if $order_info.store_info.address}
            <p>备注：{$order_info.store_info.address}</p>
            {/if}
            <a href="javascript:void(0);" class="order_btn{if $order_info.progress != 10} js_orderBtn{/if}">{if $order_info.progress == 10}订单已送达{else}处理订单{/if}</a>
        </div>
        <!-- dist_loding -->
        <div class="dist_loding none">
            <div class="loding">
                <div class="load_nav">
                    杯桶配送详单
                    <span class="load_close close_btn"></span>
                </div>
                <div class="load_inner clearfix">
                    <ul>
                        <li>杯型</li>
                        <li>每箱可装</li>
                        <li>配送箱数</li>
                        <li>配送杯数</li>
                    </ul>
                    {if $order_info.order_cup_list}
                        {foreach $order_info.order_cup_list as $k=>$v}
		                    <ul>
		                        <li>{cup_config::$cup_type[$v.cup_type]}</li>
		                        <li>{cup_config::$box2cup_num[$v.cup_type]}杯</li>
		                        <li>{$v.box_num}箱</li>
		                        <li>{$v.cup_num}杯</li>
		                    </ul>
	                    {/foreach}
                    {/if}
                </div>
                <!-- <ul class="load_footer">
                    <li class="cancel close_btn"><a href="JavaScript:void(0);">取消</a></li>
                    <li class="detemine close_btn"><a href="javascript:void(0);">确定</a></li>
                </ul> -->
                <div class="load_footer">
                     <a href="javscript:;" class=" detemine close_btn">确定</a>
                </div>
            </div>
        </div>
        
        <!-- 订单浮层 -->
        <div class="success_load none">
            <ul class="inner">
                <li>确认送达并告知经销商和商家。</li>
                <li><a url="javscript:void(0);" class="gress_btn">取消</a><a url="javscript:void(0);" class="gress_btn success_btn">确定</a></li>
            </ul>
        </div>
        
    </div>
<script type="text/javascript" src="{$smarty.const.STATIC_URL}/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
//订单详情浮层
$(function() {
    var close_btn = $(".close_btn"),
        show_btn = $(".click_type"),
        dist_loding = $(".dist_loding");

    close_btn.each(function(i) { //隐藏
        $(this).click(function() {
            dist_loding.hide();
        })
    }) 

    show_btn.click(function() { //显示
        dist_loding.show();
    })
})

// 确认订单浮层

$(function(){
    
    $(".js_orderBtn").click(function(){ // 显示
        $(".success_load").show(); 
    })

    $(".gress_btn").each(function(){ // 隐藏
        $(this).click(function(){
            $(".success_load").hide();
        })
    })
    
    $(".success_btn").click(function(){
        $.ajax({
            url:'{AnUrl("order/m/confirm_order_by_person")}',
            type:'GET',
            data:{ order_no:{$order_no}, phone_num:{$phone_num} },
            success:function(data){
                console.log(data)
                alert(data);
                location.href = '{AnUrl("order/m/order_query.html?order_no=$order_no&phone_num=$phone_num")}';
            }
        })
    })
})

    </script>
</body>

</html>
